// @ 符号在vue.config.js 中配置， 表示 'src' 路径的别名
import request from '@/utils/request'

const context_path = '/user'
export default {
  getPageList(page, size, userInfoSearchVo) {
    return request({
      url: `${context_path}/${page}/${size}`,
      method: 'get',
      params: userInfoSearchVo
      // data: userInfoSearchVo
    })
  },
  removeById(id) {
    return request({
      url: `${context_path}/${id}`,
      method: 'delete'
    })
  },
  save(data) {
    return request({
      url: `${context_path}`,
      method: 'post',
      data: data
    })
  },
  getById(id) {
    return request({
      url: `${context_path}/${id}`,
      method: 'get'
    })
  },
  updateStatus(id, status) {
    return request({
      url: `${context_path}/lock/${id}/${status}`,
      method: 'put'
    })
  },
  getUserLoginRecordTop50(userId) {
    return request({
      url: `/userLoginRecord/listLatest50/${userId}`,
      method: 'get'
    })
  }
}
